<template>
  <div>
    <div class="kongbai"></div>
    <school-title Cname="优秀师资"></school-title>

    <div class="excellent-T">
      <div v-for="item in teachers" :key="item.id">
         <img :src="'https://ss.lanqb.com/' + item.user.avatar" alt="" />
          <h3>{{ item.nickname }}</h3>
          <p>行业经验{{ item.seniority }}年</p>
      </div>
    </div>
  </div>
</template>

<script>
import SchoolTitle from "@/components/schoolTitle.vue";
export default {
  name: "SchoolTeachers",

  data() {
    return {
      teachers: [],
    };
  },
  components: {
    SchoolTitle,
  },
  created() {
    fetch("https://m.lanqb.com/api/school/teacher?limit=3")
      .then((res) => res.json())
      .then((data) => {
        // console.log(data);
        this.teachers = data.data;
        console.log(this.teachers);
      });
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
}
.kongbai {
  width: 100%;
  height: 15px;
  background-color: #eee;
}
.excellent-T {
  padding:  10px;
  display: flex;
  justify-content: space-around;
  div {
    img {
    width: 92px;
    height: 92px;
    border-radius: 50%;
  }
   h3{
      text-align: center;
  }
  p{
    color: gray;
  }
  
  }

}
</style>
